﻿using System;

namespace TAProject.UI
{
    public static class Extentions
    {
        public static string ToSimpleTelephone(this String str)
        {
            return str.
                Replace("(", string.Empty).
                Replace(")", string.Empty).
                Replace("-", string.Empty).
                Replace(" ", string.Empty).
                ToLower();
        }

        public static bool CompareDates(this DateTime dateTime1, DateTime dateTime2)
        {
            return dateTime1.ToShortDateString() == dateTime2.ToShortDateString();
        }

        public static bool CompareDates(this string dateTime1, string dateTime2)
        {
            return dateTime1 == dateTime2;
        }
    }
}
